BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.Tmp_problem_transfer_feedback
(
ID int NOT NULL IDENTITY (1, 1),
PROCESS_USER_ID int NOT NULL,
TRANSFER_ID int NOT NULL,
PROBLEM_ID int NOT NULL,
TRANSFER_FEEDBACK varchar(1000) NOT NULL,
FEEDBACK_TIME datetime NOT NULL,
PROCESS_METHOD int NOT NULL,
TRANSFERED_USER_NAMES varchar(200) NULL
)  ON [PRIMARY]
GO
ALTER TABLE dbo.Tmp_problem_transfer_feedback SET (LOCK_ESCALATION = TABLE)
GO
SET IDENTITY_INSERT dbo.Tmp_problem_transfer_feedback ON
GO
IF EXISTS(SELECT * FROM dbo.problem_transfer_feedback)
EXEC('INSERT INTO dbo.Tmp_problem_transfer_feedback (ID, PROCESS_USER_ID, TRANSFER_ID, PROBLEM_ID, TRANSFER_FEEDBACK, FEEDBACK_TIME, PROCESS_METHOD, TRANSFERED_USER_NAMES)
SELECT ID, PROCESS_USER_ID, TRANSFER_ID, PROBLEM_ID, TRANSFER_FEEDBACK, FEEDBACK_TIME, PROCESS_METHOD, TRANSFERED_USER_NAMES FROM dbo.problem_transfer_feedback WITH (HOLDLOCK TABLOCKX)')
GO
SET IDENTITY_INSERT dbo.Tmp_problem_transfer_feedback OFF
GO
DROP TABLE dbo.problem_transfer_feedback
GO
EXECUTE sp_rename N'dbo.Tmp_problem_transfer_feedback', N'problem_transfer_feedback', 'OBJECT' 
GO
ALTER TABLE dbo.problem_transfer_feedback ADD CONSTRAINT
PK_problem_transfer_feedback PRIMARY KEY CLUSTERED 
(
ID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


GO
COMMIT

alter table deleted_problem alter column PROBLEM_CONTENT varchar(800) null
go
alter table deleted_problem alter column PROBLEM_ZHENGGAI_CUOSHI varchar(800) null
go
alter table deleted_problem_transfer_feedback alter column TRANSFER_FEEDBACK varchar(1000) not null
go


